package com.egao.gzh.service;

import com.egao.common.core.damon.utils.HttpsUtils;
import net.sf.json.JSONObject;

/**
 * @author Damon
 * @create 2020-08-27 10:09
 */
public class Qingyunke {

    public static void main(String[] args) throws Exception {
        Qingyunke qk = new Qingyunke();
        System.out.println("111:"+qk.netChat("aaa"));
    }

    public String netChat(String msg) {
        String url = "http://api.qingyunke.com/api.php?key=free&appid=0&msg="+msg;
        String res2 = null;
        try {
            res2 = HttpsUtils.post(url,null,null,null);
        } catch (Exception e) {
            e.printStackTrace();
        }
        JSONObject obj = JSONObject.fromObject(res2);
        String str = obj.getString("content");
        return str;
    }


}
